using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

using AspNetForums;
using AspNetForums.Components;
using AspNetForums.Controls;
using AspNetForums.Enumerations;

namespace AspNetForums.Admin
{
	/// <summary>
	/// Summary description for MemberConfiguration.
	/// </summary>
	public class MemberConfiguration : System.Web.UI.Page
	{
		protected System.Web.UI.WebControls.Button SelectDomain;
		protected System.Web.UI.WebControls.RadioButtonList AllowLogin;
		protected System.Web.UI.WebControls.RadioButtonList AllowNewUserRegistration;
		protected System.Web.UI.WebControls.TextBox UsernameMinLength;
		protected System.Web.UI.WebControls.TextBox UsernameMaxLength;
		protected System.Web.UI.WebControls.RadioButtonList AutoRegisterForWindowsAuthentication;
		protected System.Web.UI.WebControls.RadioButtonList AccountActivation;
		protected System.Web.UI.WebControls.RadioButtonList PasswordRecovery;
		protected System.Web.UI.WebControls.DropDownList PasswordFormat;
		protected System.Web.UI.WebControls.RadioButtonList EnableCOPPA;
		protected System.Web.UI.WebControls.RadioButtonList EnableUsernameChange;
		protected System.Web.UI.WebControls.RadioButtonList AllowSignatures;
		protected System.Web.UI.WebControls.RadioButtonList EnableSignatures;
		protected System.Web.UI.WebControls.TextBox SignatureMaxLength;
		protected System.Web.UI.WebControls.RadioButtonList AllowGender;
		protected System.Web.UI.WebControls.RadioButtonList AllowUserToSelectTheme;
		protected System.Web.UI.WebControls.RadioButtonList EnableUserReferrer;
		protected System.Web.UI.WebControls.RadioButtonList EnableAvatars;
		protected System.Web.UI.WebControls.RadioButtonList EnableRemoteAvatars;
		protected System.Web.UI.WebControls.TextBox AvatarHeight;
		protected System.Web.UI.WebControls.TextBox AvatarWidth;
		protected System.Web.UI.WebControls.Button Save;
		protected System.Web.UI.WebControls.Button Reset;

		protected AspNetForums.Components.SiteSettings settings;
		protected AspNetForums.Controls.DomainDropDownList Domain;
		protected ModerationLevelDropDownList NewUserModerationLevel;

		private void Page_Load(object sender, System.EventArgs e)
		{
			Save.Attributes["onclick"] = "return confirm('" + string.Format(AspNetForums.Components.ResourceManager.GetString("Cache_Warning"), Globals.GetSiteSettings().SiteSettingsCacheWindowInMinutes) + "');";								

			// Wire-up buttons
			//
			Save.Click += new EventHandler(Save_Click);
			Reset.Click += new EventHandler(Reset_Click);

			if (!Page.IsPostBack)
				DataBind();
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{    
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion
		public void Reset_Click (Object sender, EventArgs e) {
			settings = new AspNetForums.Components.SiteSettings();
			settings.SiteDomain = Domain.SelectedDomain;

			settings.Save();

			DataBind();
		}

		public void ChangeApplication_Click (object sender, EventArgs e) {
			DataBind();
		}

		public void Save_Click (Object sender, EventArgs e) {

			settings = AspNetForums.Components.SiteSettings.GetSiteSettings(Domain.SelectedDomain);
			settings.SiteDomain = Domain.SelectedDomain;

			settings.AllowUserSignatures            = Boolean.Parse( AllowSignatures.SelectedItem.Value);
			settings.EnableUserSignatures           = Boolean.Parse( EnableSignatures.SelectedItem.Value);
			settings.UserSignatureMaxLength         = int.Parse( SignatureMaxLength.Text);
			settings.AccountActivation              = (AccountActivation) Enum.Parse( typeof(AccountActivation), AccountActivation.SelectedItem.Value);
			settings.PasswordRecovery               = (PasswordRecovery) Enum.Parse( typeof(PasswordRecovery), PasswordRecovery.SelectedItem.Value);
			settings.PasswordFormat                 = (UserPasswordFormat) Enum.Parse( typeof(UserPasswordFormat), PasswordFormat.SelectedItem.Value);
			settings.EnableUsernameChange           = Boolean.Parse( EnableUsernameChange.SelectedItem.Value);
			settings.AllowNewUserRegistration       = Boolean.Parse( AllowNewUserRegistration.SelectedItem.Value);
			settings.AllowLogin                     = Boolean.Parse( AllowLogin.SelectedItem.Value);
			settings.NewUserModerationLevel         = NewUserModerationLevel.SelectedValue;
			settings.AllowGender                    = Boolean.Parse( AllowGender.SelectedItem.Value);

			settings.EnableAvatars                  = Boolean.Parse( EnableAvatars.SelectedItem.Value);
			settings.EnableRemoteAvatars            = Boolean.Parse( EnableRemoteAvatars.SelectedItem.Value);
			settings.AvatarHeight                   = int.Parse( AvatarHeight.Text);
			settings.AvatarWidth                    = int.Parse( AvatarWidth.Text);

			// Save the settings
			//
			settings.Save();
		
			// Done with the update, repopulate the form
			//
			DataBind();

		}
/*
		// *********************************************************************
		//  SiteSettingsView
		//
		/// <summary>
		/// This server control is used to display Site Settings information.
		/// </summary>
		/// 
		// ********************************************************************
		public class SiteSettingsView : SkinnedForumWebControl {

			string generalSettings              = "/Admin/View-SiteSettings.ascx";
			string memberSettings               = "/Admin/View-MemberSettings.ascx";

			SiteSettingsMode viewMode = SiteSettingsMode.GeneralSettings;

			// Form Elements
			//
			TextBox siteName;
			TextBox siteDescription;
			TextBox smtpServer;
			RadioButtonList enableEmail;
			RadioButtonList enableAnonymousTracking;
			RadioButtonList disabled;
			TextBox threadsPerPage;
			TextBox postsPerPage;
			RadioButtonList enableRolesCookie;
			RadioButtonList autoPostDelete;
			RadioButtonList autoUserDelete;
			RadioButtonList anonymousPosting;
			RadioButtonList publicMemberList;
			RadioButtonList publicCurrentTime;
			RadioButtonList publicForumDescription;
			RadioButtonList enableEmoticons;
			RadioButtonList enableAvatars;
			RadioButtonList enableRemoteAvatars;
			RadioButtonList publicWhoIsOnline;
			RadioButtonList publicTodaysBirthdays;
			TextBox avatarHeight;
			TextBox avatarWidth;
			TextBox rolesCookieName;
			TextBox rolesCookieExpiration;
			TextBox anonymousCookieName;
			TextBox anonymousCookieExpiration;
			TextBox cookieDomain;
			TextBox anonymousUserOnlineTimeWindow;
			TextBox adminEmailAddress;
			TextBox companyAddress;
			TextBox companyFaxNumber;
			TextBox companyEmailAddress;
			TextBox companyName;
			Button save;
			Button reset;
			Button applicationSelect;

			#region Home Page Menus & Sections
			YesNoRadioButtonList publicSiteStatistics;
			#endregion

			#region Application to manage
			DomainDropDownList domain;
			#endregion

			#region RSS
			RadioButtonList enableRss;
			TextBox rssDefaultThreadsPerFeed;
			TextBox rssMaxThreadsPerFeed;
			TextBox rssCacheWindowInMinutes;
			#endregion

			#region User Registration
			RadioButtonList accountActivationOption;
			DropDownList passwordFormat;
			RadioButtonList passwordRecovery;
			RadioButtonList enableUsernameChange;
			TextBox signatureMaxLength;
			RadioButtonList allowSignatures;
			RadioButtonList enableSignatures;
			RadioButtonList allowNewUserRegistration;
			RadioButtonList allowLogin;
			ModerationLevelDropDownList newUserModerationLevel;
			RadioButtonList enableNewUsersModerated;
			RadioButtonList allowGender;
			#endregion

			#region User Posting
			RadioButtonList allowDuplicatePosts;
			TextBox duplicatePostIntervalInMinutes;
			TextBox postInterval;
			#endregion

			#region IP Address Tracking
			RadioButtonList trackPostsByIP;
			RadioButtonList displayPostIP;
			RadioButtonList displayPostIPAdminsModeratorsOnly;
			#endregion

			#region Date & Times
			TimezoneDropDownList timeZone;
			DateFormatDropDownList dateFormat;
			TextBox timeFormat;
			#endregion

			#region Posts
			TextBox popularPostThresholdPosts;
			TextBox popularPostThresholdViews;
			TextBox popularPostThresholdDays;
			#endregion

			#region Member list and Top Posters
			TextBox topPostMaxMembersToDisplay;
			TextBox membersPerPage;
			YesNoRadioButtonList enablePublicAdvancedMemberSearch;
			#endregion


			#region Post Editing
			YesNoRadioButtonList enableDisplayEditNotes;
			TextBox editPostBodyAge;
			TextBox editPostTitleAge;
			#endregion

			#region Forum URLs
			RadioButtonList enableSearchFriendlyURLs;
			#endregion

			protected override void CreateChildControls() {
				switch (viewMode) {
					case SiteSettingsMode.GeneralSettings:
						SkinFilename = generalSettings;
						break;

					case SiteSettingsMode.MemberSettings:
						SkinFilename = memberSettings;
						break;
				}

				base.CreateChildControls();
			}

			#region Initialize Skin
			// *********************************************************************
			//  Initializeskin
			//
			/// <summary>
			/// Initializes the user control loaded in CreateChildControls. Initialization
			/// consists of finding well known control names and wiring up any necessary events.
			/// </summary>
			/// 
			// ********************************************************************
			protected override void InitializeSkin(Control skin) {

				// TextBox
				//
				siteName                        = (TextBox) skin.FindControl("SiteName");
				siteDescription                 = (TextBox) skin.FindControl("SiteDescription");
				smtpServer                      = (TextBox) skin.FindControl("SmtpServer");
				threadsPerPage                  = (TextBox) skin.FindControl("ThreadsPerPage");
				postsPerPage                    = (TextBox) skin.FindControl("PostsPerPage");
				avatarHeight                    = (TextBox) skin.FindControl("AvatarHeight");
				avatarWidth                     = (TextBox) skin.FindControl("AvatarWidth");
				rolesCookieName                 = (TextBox) skin.FindControl("RolesCookieName");
				anonymousCookieName             = (TextBox) skin.FindControl("AnonymousCookieName");
				anonymousUserOnlineTimeWindow   = (TextBox) skin.FindControl("AnonymousUserOnlineTimeWindow");
				rolesCookieExpiration           = (TextBox) skin.FindControl("RolesCookieExpiration");
				anonymousCookieExpiration       = (TextBox) skin.FindControl("AnonymousCookieExpiration");
				cookieDomain                    = (TextBox) skin.FindControl("CookieDomain"); 

				#region Application to manage
				domain                          = (DomainDropDownList) skin.FindControl("Domain");
				applicationSelect               = (Button) skin.FindControl("SelectDomain");
				applicationSelect.Click         += new EventHandler(ChangeApplication_Click);
				#endregion

				#region Forums Disabled
				disabled                        = (RadioButtonList) skin.FindControl("Disabled");
				#endregion

				#region Contact Us
				adminEmailAddress               = (TextBox) skin.FindControl("AdminEmailAddress");
				companyAddress                  = (TextBox) skin.FindControl("CompanyAddress");
				companyFaxNumber                = (TextBox) skin.FindControl("CompanyFaxNumber");
				companyEmailAddress             = (TextBox) skin.FindControl("CompanyEmailAddress");
				companyName                     = (TextBox) skin.FindControl("CompanyName");
				#endregion

				#region Home Page Menus & Sections
				publicMemberList                = (RadioButtonList) skin.FindControl("PublicMemberList");
				publicWhoIsOnline               = (RadioButtonList) skin.FindControl("DisplayWhoIsOnline");
				publicTodaysBirthdays           = (RadioButtonList) skin.FindControl("DisplayBirthdays");
				publicCurrentTime               = (RadioButtonList) skin.FindControl("DisplayCurrentTime");
				publicForumDescription          = (RadioButtonList) skin.FindControl("DisplayForumDescription");
				publicSiteStatistics            = (YesNoRadioButtonList) skin.FindControl("DisplayStatistics");
				#endregion

				#region RSS
				enableRss                       = (RadioButtonList) skin.FindControl("EnableForumRSS");
				rssDefaultThreadsPerFeed        = (TextBox) skin.FindControl("RSSDefaultThreadsPerFeed");
				rssMaxThreadsPerFeed            = (TextBox) skin.FindControl("RSSMaxThreadsPerFeed");
				rssCacheWindowInMinutes         = (TextBox) skin.FindControl("RssCacheWindowInMinutes");
				#endregion

				#region User settings and Registration
				signatureMaxLength              = (TextBox) skin.FindControl("SignatureMaxLength");
				allowSignatures                 = (RadioButtonList) skin.FindControl("AllowSignatures");
				enableSignatures                = (RadioButtonList) skin.FindControl("EnableSignatures");
				accountActivationOption         = (RadioButtonList) skin.FindControl("AccountActivation");
				passwordRecovery                = (RadioButtonList) skin.FindControl("PasswordRecovery");
				passwordFormat                  = (DropDownList) skin.FindControl("PasswordFormat");
				enableUsernameChange            = (RadioButtonList) skin.FindControl("EnableUsernameChange");            
				allowNewUserRegistration        = (RadioButtonList) skin.FindControl("AllowNewUserRegistration");            
				allowLogin                      = (RadioButtonList) skin.FindControl("AllowLogin");            
				newUserModerationLevel          = (ModerationLevelDropDownList) skin.FindControl("NewUserModerationLevel");            
				allowGender                     = (RadioButtonList) skin.FindControl("AllowGender");            
				#endregion

				#region Date & Times
				dateFormat                      = (DateFormatDropDownList) skin.FindControl("DateFormat");
				timeFormat                      = (TextBox) skin.FindControl("TimeFormat");
				timeZone                        = (TimezoneDropDownList) skin.FindControl("Timezone");
				#endregion

				#region User Posting
				allowDuplicatePosts             = (RadioButtonList) skin.FindControl("AllowDuplicatePosts");
				duplicatePostIntervalInMinutes  = (TextBox) skin.FindControl("DuplicatePostIntervalInMinutes");
				postInterval                    = (TextBox) skin.FindControl("PostInterval");
				#endregion

				#region IP Address Tracking
				trackPostsByIP                      = (RadioButtonList) skin.FindControl("EnableTrackPostsByIP");
				displayPostIP                       = (RadioButtonList) skin.FindControl("DisplayPostIP");
				displayPostIPAdminsModeratorsOnly   = (RadioButtonList) skin.FindControl("DisplayPostIPAdminsModeratorsOnly");
				#endregion

				#region Member list and Top Posters
				topPostMaxMembersToDisplay          = (TextBox) skin.FindControl("MemberListTopPostersToDisplay");
				membersPerPage                      = (TextBox) skin.FindControl("MemberListPageSize");
				enablePublicAdvancedMemberSearch    = (YesNoRadioButtonList) skin.FindControl("MemberListAdvancedSearch");
				#endregion

				#region Posts
				popularPostThresholdPosts       = (TextBox) skin.FindControl("PopularPostThresholdPosts");
				popularPostThresholdViews       = (TextBox) skin.FindControl("PopularPostThresholdViews");
				popularPostThresholdDays        = (TextBox) skin.FindControl("PopularPostThresholdDays");
				#endregion

				#region Post Editing
				enableDisplayEditNotes          = (YesNoRadioButtonList) skin.FindControl("DisplayEditNotes");
				editPostBodyAge                 = (TextBox) skin.FindControl("PostEditBodyAgeInMinutes");
				editPostTitleAge                = (TextBox) skin.FindControl("PostEditTitleAgeInMinutes");
				#endregion

				#region Forum URLs
				enableSearchFriendlyURLs        = (RadioButtonList ) skin.FindControl("EnableSearchFriendlyURLs");
				#endregion


				// DropDownLists & RadioButtonLists
				//
				autoPostDelete                  = (RadioButtonList) skin.FindControl("AutoPostDelete");
				autoUserDelete                  = (RadioButtonList) skin.FindControl("AutoUserDelete");
				anonymousPosting                = (RadioButtonList) skin.FindControl("AnonymousPosting");
				enableEmoticons                 = (RadioButtonList) skin.FindControl("EnableEmoticons");
				enableAvatars                   = (RadioButtonList) skin.FindControl("EnableAvatars");
				enableRemoteAvatars             = (RadioButtonList) skin.FindControl("EnableRemoteAvatars");
				enableRolesCookie               = (RadioButtonList) skin.FindControl("EnableRolesCookie");
				enableAnonymousTracking         = (RadioButtonList) skin.FindControl("EnableAnonymousTracking");
				enableEmail                     = (RadioButtonList) skin.FindControl("EnableEmail");

				// Buttons
				//
				save                            = (Button) skin.FindControl("Save");
				reset                           = (Button) skin.FindControl("Reset");

				save.Attributes["onclick"] = "return confirm('" + string.Format(AspNetForums.Components.ResourceManager.GetString("Cache_Warning"), Globals.GetSiteSettings().SiteSettingsCacheWindowInMinutes) + "');";								

				// Wire-up buttons
				//
				save.Click += new EventHandler(Save_Click);
				reset.Click += new EventHandler(Reset_Click);

				if (!Page.IsPostBack)
					DataBind();

			}
			#endregion

			#region Reset Event
			#endregion

			#region Save Event
			#endregion
        
			public override void DataBind() {

				settings = SiteSettings.GetSiteSettings(domain.SelectedDomain);

				switch (viewMode) {

					case SiteSettingsMode.MemberSettings:
						#region User Registration
						accountActivationOption.Items.FindByValue( settings.AccountActivation.ToString() ).Selected = true;
						passwordRecovery.Items.FindByValue(settings.PasswordRecovery.ToString()).Selected = true;
						passwordFormat.Items.FindByValue(settings.PasswordFormat.ToString()).Selected = true;
						enableUsernameChange.Items.FindByValue(settings.EnableUsernameChange.ToString()).Selected = true;
						signatureMaxLength.Text = settings.UserSignatureMaxLength.ToString();
						allowSignatures.Items.FindByValue(settings.AllowUserSignatures.ToString()).Selected = true;
						enableSignatures.Items.FindByValue(settings.EnableUserSignatures.ToString()).Selected = true;
						allowNewUserRegistration.Items.FindByValue(settings.AllowNewUserRegistration.ToString()).Selected = true;
						allowLogin.Items.FindByValue(settings.AllowLogin.ToString()).Selected = true;
						newUserModerationLevel.SelectedValue = settings.NewUserModerationLevel;
						allowGender.Items.FindByValue(settings.AllowGender.ToString()).Selected = true;
						#endregion

						#region Avatars
						enableAvatars.Items.FindByValue(settings.EnableAvatars.ToString()).Selected = true;
						enableRemoteAvatars.Items.FindByValue(settings.EnableRemoteAvatars.ToString()).Selected = true;
						avatarHeight.Text = settings.AvatarHeight.ToString();
						avatarWidth.Text = settings.AvatarWidth.ToString();
						#endregion
						break;

					default:
						#region Forums Disabled
						disabled.Items.FindByValue(settings.ForumsDisabled.ToString()).Selected = true;
						#endregion

						#region Contact Us
						adminEmailAddress.Text          = settings.AdminEmailAddress;
						companyAddress.Text             = settings.CompanyAddress;
						companyFaxNumber.Text           = settings.CompanyFaxNumber;
						companyEmailAddress.Text        = settings.CompanyContactUs;
						companyName.Text                = settings.CompanyName;
						#endregion

						#region Home Page Menus & Sections
						publicMemberList.Items.FindByValue(settings.EnablePublicMemberList.ToString()).Selected = true;
						publicWhoIsOnline.Items.FindByValue(settings.EnableWhoIsOnline.ToString()).Selected = true;
						publicTodaysBirthdays.Items.FindByValue(settings.EnableBirthdays.ToString()).Selected = true;
						publicCurrentTime.Items.FindByValue(settings.EnableCurrentTime.ToString()).Selected = true;
						publicForumDescription.Items.FindByValue(settings.EnableForumDescription.ToString()).Selected = true;
						publicSiteStatistics.SelectedValue = settings.EnableSiteStatistics;
						#endregion

						#region RSS
						enableRss.Items.FindByValue(settings.EnableRSS.ToString()).Selected = true;
						rssCacheWindowInMinutes.Text = settings.RssCacheWindowInMinutes.ToString();
						rssDefaultThreadsPerFeed.Text = settings.RssDefaultThreadsPerFeed.ToString();
						rssMaxThreadsPerFeed.Text = settings.RssMaxThreadsPerFeed.ToString();
						#endregion

						#region User Posting
						allowDuplicatePosts.Items.FindByValue(settings.EnableDuplicatePosts.ToString()).Selected = true;
						duplicatePostIntervalInMinutes.Text = settings.DuplicatePostIntervalInMinutes.ToString();
						#endregion

						#region Date & Times
						timeZone.SelectedValue = settings.TimezoneOffset.ToString();
						timeFormat.Text = settings.TimeFormat;
						if (dateFormat.Items.FindByValue( settings.DateFormat ) != null)
							dateFormat.Items.FindByValue( settings.DateFormat ).Selected = true;
						#endregion

						#region Posts
						popularPostThresholdPosts.Text = settings.PopularPostLevelPosts.ToString();
						popularPostThresholdViews.Text = settings.PopularPostLevelViews.ToString();
						popularPostThresholdDays.Text = settings.PopularPostLevelDays.ToString();
						#endregion

						#region IP Address Tracking
						trackPostsByIP.Items.FindByValue(settings.EnableTrackPostsByIP.ToString()).Selected = true;
						displayPostIP.Items.FindByValue(settings.DisplayPostIP.ToString()).Selected = true;
						displayPostIPAdminsModeratorsOnly.Items.FindByValue(settings.DisplayPostIPAdminsModeratorsOnly.ToString()).Selected = true;
						#endregion

						#region Post Editing
						enableDisplayEditNotes.SelectedValue    = settings.DisplayEditNotesInPost;
						editPostBodyAge.Text                    = settings.PostEditBodyAgeInMinutes.ToString();
						editPostTitleAge.Text                   = settings.PostEditTitleAgeInMinutes.ToString();
						#endregion

						#region Forum URLs
						enableSearchFriendlyURLs.Items.FindByValue(settings.EnableSearchFriendlyURLs.ToString()).Selected = true;
						#endregion

						#region Member list and Top Posters
						topPostMaxMembersToDisplay.Text     = settings.MaxTopPostersToDisplay.ToString();
						membersPerPage.Text                 = settings.MembersPerPage.ToString();
						enablePublicAdvancedMemberSearch.SelectedValue = settings.EnablePublicAdvancedMemberSearch;
						#endregion

						// Tab 1
						siteName.Text = settings.SiteName;
						siteDescription.Text = settings.SiteDescription;

						threadsPerPage.Text = settings.ThreadsPerPage.ToString();
						postsPerPage.Text = settings.PostsPerPage.ToString();

						// Tab 3
						enableEmoticons.Items.FindByValue(settings.EnableEmoticons.ToString()).Selected = true;
						postInterval.Text = settings.PostInterval.ToString();
						autoPostDelete.Items.FindByValue(settings.EnableAutoPostDelete.ToString()).Selected = true;
						autoUserDelete.Items.FindByValue(settings.EnableAutoUserDelete.ToString()).Selected = true;
            
						// Tab 5
						enableAnonymousTracking.Items.FindByValue(settings.EnableAnonymousUserTracking.ToString()).Selected = true;
						rolesCookieName.Text = settings.RoleCookieName;
						rolesCookieExpiration.Text = settings.RoleCookieExpiration.ToString();
						enableRolesCookie.Items.FindByValue( settings.EnableRoleCookie.ToString() ).Selected = true;
						anonymousCookieName.Text = settings.AnonymousCookieName;
						anonymousCookieExpiration.Text = settings.AnonymousCookieExpiration.ToString();
						cookieDomain.Text = settings.CookieDomain.ToString(); 

            
						// Tab 6
						anonymousPosting.Items.FindByValue(settings.EnableAnonymousUserPosting.ToString()).Selected = true;
						anonymousUserOnlineTimeWindow.Text = settings.AnonymousUserOnlineTimeWindow.ToString();
            
						// Tab 7
						smtpServer.Text = settings.SmtpServer;
						enableEmail.Items.FindByValue( settings.EnableEmail.ToString() ).Selected = true;

						break;
				}

			}


			public SiteSettingsMode ViewMode {
				get { return viewMode; }
				set { viewMode = value; }
			}

		}

	}
*/
	}
}
